package edu.cmu.cs.stage3.alice.authoringtool.util;

/**
 * @author Jason Pratt
 */
public class AliceMenuWithDelayedPopup extends AliceMenu {
	protected java.util.Vector structure;
	protected boolean menuHasBeenPopulated = false;

	public AliceMenuWithDelayedPopup( String title, java.util.Vector structure ) {
		super( title );
		this.structure = structure;
	}

	//Rem @Override
	public javax.swing.JPopupMenu getPopupMenu() {
		if( ! menuHasBeenPopulated ) {
			PopupMenuUtilities.populateDelayedMenu( this, structure );
			menuHasBeenPopulated = true;
		}
		return super.getPopupMenu();
	}
}